package com.ruoyi.project.WebMoudle.ShopOffUser.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.WebMoudle.ShopOffUser.domain.OffResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.WebMoudle.ShopOffUser.mapper.ShopOffUserMapper;
import com.ruoyi.project.WebMoudle.ShopOffUser.domain.ShopOffUser;
import com.ruoyi.project.WebMoudle.ShopOffUser.service.IShopOffUserService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 用户注销商铺记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-08-04
 */
@Service
public class ShopOffUserServiceImpl implements IShopOffUserService 
{
    @Autowired
    private ShopOffUserMapper shopOffUserMapper;

    /**
     * 查询用户注销商铺记录
     * 
     * @param id 用户注销商铺记录ID
     * @return 用户注销商铺记录
     */
    @Override
    public ShopOffUser selectShopOffUserById(Long id)
    {
        return shopOffUserMapper.selectShopOffUserById(id);
    }

    /**
     * 查询用户注销商铺记录列表
     * 
     * @param shopOffUser 用户注销商铺记录
     * @return 用户注销商铺记录
     */
    @Override
    public List<ShopOffUser> selectShopOffUserList(ShopOffUser shopOffUser)
    {
        return shopOffUserMapper.selectShopOffUserList(shopOffUser);
    }

    /**
     * 新增用户注销商铺记录
     * 
     * @param shopOffUser 用户注销商铺记录
     * @return 结果
     */
    @Override
    public int insertShopOffUser(ShopOffUser shopOffUser)
    {
        shopOffUser.setCreateTime(DateUtils.getNowDate());
        return shopOffUserMapper.insertShopOffUser(shopOffUser);
    }

    /**
     * 修改用户注销商铺记录
     * 
     * @param shopOffUser 用户注销商铺记录
     * @return 结果
     */
    @Override
    public int updateShopOffUser(ShopOffUser shopOffUser)
    {
        shopOffUser.setUpdateTime(DateUtils.getNowDate());
        return shopOffUserMapper.updateShopOffUser(shopOffUser);
    }

    /**
     * 删除用户注销商铺记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteShopOffUserByIds(String ids)
    {
        return shopOffUserMapper.deleteShopOffUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户注销商铺记录信息
     * 
     * @param id 用户注销商铺记录ID
     * @return 结果
     */
    @Override
    public int deleteShopOffUserById(Long id)
    {
        return shopOffUserMapper.deleteShopOffUserById(id);
    }

    @Override
    public List<ShopOffUser> queryOffListByShopId(Long shopId) {
        return shopOffUserMapper.queryOffListByShopId(shopId);
    }

    @Override
    public int queryOffShopCount() {
        return shopOffUserMapper.queryOffShopCount();
    }
}
